#include "stdafx.h"
#include "Fakes/FakeD3D11Texture1D.h"
#include "Fakes/FakeD3D11Texture2D.h"

DESCRIPTION_11_TEST_SUITE(UnorderedTexture1DArrayViewDescription)

BOOST_FIXTURE_TEST_CASE(Default, TestUnorderedTexture1DArrayViewDescription)
{
	BOOST_REQUIRE_EQUAL(D3D11_UAV_DIMENSION_TEXTURE1DARRAY, m_desc.ViewDimension);
	BOOST_REQUIRE_EQUAL(DXGI_FORMAT_UNKNOWN, m_desc.Format);
	BOOST_REQUIRE_EQUAL(~0U, m_desc.Texture1DArray.ArraySize);
	BOOST_REQUIRE_EQUAL(0, m_desc.Texture1DArray.FirstArraySlice);
	BOOST_REQUIRE_EQUAL(0, m_desc.Texture1DArray.MipSlice);
}

#define UNORDERED_TEXTURE1D_ARRAY_VIEW_TEST_CASE(field_, type_, value_) \
	DESCRIPTION_11_SETTER_FIXTURE_TEST_CASE(field_##_, UnorderedTexture1DArrayViewDescription, \
		type_, value_, Texture1DArray.field_)

UNORDERED_TEXTURE1D_ARRAY_VIEW_TEST_CASE(ArraySize, UINT, 10)
UNORDERED_TEXTURE1D_ARRAY_VIEW_TEST_CASE(FirstArraySlice, UINT, 10)
UNORDERED_TEXTURE1D_ARRAY_VIEW_TEST_CASE(MipSlice, UINT, 2)

TEXTURE1D_SETTER_TEST_CASE(ArraySize, TestUnorderedTexture1DArrayViewDescription, \
						   Texture1DArray.ArraySize, UINT, 2)
TEXTURE2D_SETTER_TEST_CASE(ArraySize, TestUnorderedTexture1DArrayViewDescription, \
						   Texture1DArray.ArraySize, UINT, 2)

BOOST_AUTO_TEST_SUITE_END()
